<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up()
    {
        Schema::create('feedback_records', function (Blueprint $table) {
            $table->id();
            $table->foreignId('teacher_id'); // 老师ID（外键）
            $table->foreignId('student_id'); // 学生ID（外键）
            $table->foreignId('clazz_id'); // 班级ID（外键）
            $table->timestamp('feedback_time'); // 评价时间
            $table->integer('year'); // 评价年份
            $table->integer('month'); // 评价月份
            $table->integer('week'); // 评价周次
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('feedback_records');
    }
};
